﻿<!--revision $Id$-->
	<Window x:Class="OpenWPFChart.Helpers.ChooseColorDialog.ColorDialog"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:win="clr-namespace:System.Windows;assembly=PresentationCore"
	xmlns:local="clr-namespace:OpenWPFChart.Helpers.ChooseColorDialog"
    Title="Color" 
	Style="{DynamicResource dialogWindow}"
	MinHeight="200" MinWidth="300" ResizeMode="CanResizeWithGrip" SizeToContent="WidthAndHeight"
	ShowInTaskbar="False">
	
	<Window.Resources>
		<ResourceDictionary>
			<ResourceDictionary.MergedDictionaries>
				<ResourceDictionary Source="../../DialogStyle.xaml"/>
			</ResourceDictionary.MergedDictionaries>

			<Style x:Key="dialogButtonStyle" TargetType="Button">
				<Setter Property="Margin" Value="5"/>
				<Setter Property="Width" Value="75"/>
			</Style>
			<Style x:Key="dialogButtonPanelStyle">
				<Setter Property="FrameworkElement.Margin" Value="0,0,10,0"/>
				<Setter Property="FrameworkElement.HorizontalAlignment" Value="Right"/>
			</Style>
			
			<DrawingBrush x:Key="checkboardBrush" 
				Stretch="None" TileMode="Tile" AlignmentX="Left" AlignmentY="Top" 
				Viewport="0,0,10,10" ViewportUnits="Absolute">
				<DrawingBrush.Drawing>
					<DrawingGroup>
						<GeometryDrawing Brush="sc# 1,1,1">
							<GeometryDrawing.Geometry>
								<RectangleGeometry Rect="0,0,10,10" />
							</GeometryDrawing.Geometry>
						</GeometryDrawing>
						<GeometryDrawing Brush="sc# 0.5,0.5,0.5">
							<GeometryDrawing.Geometry>
								<RectangleGeometry Rect="0,0,5,5" />
							</GeometryDrawing.Geometry>
						</GeometryDrawing>
						<GeometryDrawing Brush="sc# 0.5,0.5,0.5">
							<GeometryDrawing.Geometry>
								<RectangleGeometry Rect="5,5,5,5" />
							</GeometryDrawing.Geometry>
						</GeometryDrawing>
					</DrawingGroup>
				</DrawingBrush.Drawing>
			</DrawingBrush>
		</ResourceDictionary>
	</Window.Resources>

	<DockPanel>
		<!--Dialog Buttons-->
		<Grid DockPanel.Dock="Bottom" Grid.IsSharedSizeScope="True"
			  Style="{StaticResource dialogButtonPanelStyle}">
			<Grid.ColumnDefinitions>
				<ColumnDefinition Width="Auto" SharedSizeGroup="dialogButtons"/>
				<ColumnDefinition Width="Auto" SharedSizeGroup="dialogButtons"/>
			</Grid.ColumnDefinitions>

			<Button Name="btnOK" IsDefault="True" IsEnabled="False" Click="btnOK_Click"
					Style="{StaticResource dialogButtonStyle}">_OK</Button>
			<Button Grid.Column="1" IsCancel="True" Style="{StaticResource dialogButtonStyle}">_Cancel</Button>
		</Grid>
		
		<!-- Color chooser panel -->
		<local:ColorChooser x:Name="colorChooser"/>
	</DockPanel>
</Window>
